home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 233 / Computer Shopper 233 / ComputerShopperDVD233.iso / Expert / Feedreader / FeedReader309Setup.exe / {app} / stylesheet / atom.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2007-01-24  |  7.0 KB  |  275 lines

  1. ∩╗┐<?xml version="1.0" ?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                 xmlns:feed="http://www.w3.org/2005/Atom"
  5.                 xmlns:frc="http://www.feedreader.com/ns/3.0/frc"
  6.                 xmlns:fr="http://www.feedreader.com/ns/3.0"
  7.                 version="1.0">
  8. <xsl:output method="html" />
  9.  
  10. <xsl:template match="/">
  11.  
  12. <html>
  13.   <head>
  14.     <title><xsl:value-of select="/feed:feed/feed:title"/></title>
  15.     <link rel="stylesheet" href="atom.css"/>
  16.     <style>
  17.  
  18. body {
  19.  font-family: verdana, tahoma;
  20.  font-size: 0.7em;
  21.  line-height: 1.3em;
  22.  padding: 0;
  23.  margin: 0;
  24. }
  25.  
  26.  
  27. a, a:link, a:active, a:visited {
  28.  text-decoration: none;
  29.  color: #0088ff;
  30. }
  31.  
  32. div.entry {
  33.  padding: 0 20px 20px 25px;
  34.  border-bottom: 1px solid #ddd;
  35. }
  36.  
  37. div.content img {
  38. }
  39.  
  40. div.active {
  41.  background-color: #f1f5fa;;
  42. }
  43.  
  44. .read .title a {
  45.  color: #aaa;
  46. }
  47.  
  48.  
  49. .read .content {
  50.  color: #555;
  51. }
  52.  
  53. div.entry .read .title a {
  54.  color: gray;
  55. }
  56.  
  57. .header {
  58.  padding-top: 20px;
  59.  margin: 0 0 0.2em 0;
  60. }
  61.  
  62. .title {
  63.  font-size: 1.6em;
  64.  font-family: arial, verdana, tahoma;
  65.  font-weight: bold;
  66.  letter-spacing: -1px;
  67.  line-height: 1.1em;
  68. }
  69.  
  70. div.details {
  71.  color: gray;
  72.  margin-bottom: 0.5em;
  73. }
  74. div.clear {
  75.  clear:both;
  76.  height: 1px;
  77.  width: 1px;
  78.  font-size: 1px;
  79.  line-height: 1px;
  80. }
  81. span.modified, span.author, span.category {
  82. }
  83.  
  84. .starred a {
  85.  display:block;
  86.  line-height: 0;
  87.  font-size: 0;
  88.  width: 12px; 
  89.  height: 12px;
  90.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/starred.png');
  91.  background-repeat: no-repeat;
  92. }
  93.  
  94. .unstarred a {
  95.  display:block;
  96.  line-height: 0;
  97.  font-size: 0;
  98.  width: 12px; 
  99.  height: 12px;
  100.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unstarred.png');
  101.  background-repeat: no-repeat;
  102. }
  103.  
  104.  
  105. .status a {
  106.  display:block;
  107.  line-height: 0;
  108.  font-size: 0;
  109.  width: 8px; 
  110.  height: 8px;
  111.  margin-top: -1.5em;
  112.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unread_8x8.png');
  113.  background-repeat: no-repeat;
  114. }
  115.  
  116. .read .status a {
  117.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/read_8x8.png');
  118. }
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. </style>
  126. <base>    
  127. <xsl:attribute name="href"><xsl:value-of select="/feed:feed/feed:entry/feed:source/feed:link[@rel='alternate'][1]/@href"/>/</xsl:attribute>
  128. </base> 
  129.   </head>    
  130.   <body>
  131.   <script type="text/javascript">
  132.   var imagebase='file://<xsl:value-of select="/feed:feed/fr:imagebase"/>';
  133.   </script>
  134.   <xsl:apply-templates select="feed:feed"/>
  135.   </body>
  136. </html>
  137. </xsl:template>
  138.  
  139. <xsl:template match="feed:feed">
  140.   <xsl:apply-templates select="feed:entry"/>
  141. </xsl:template>
  142.  
  143. <xsl:template match="feed:entry">
  144.  
  145.     <div class="entry">
  146.         <xsl:attribute name="id">article<xsl:value-of select="fr:item_id"/></xsl:attribute>
  147.         <xsl:if test="fr:rtlEnabled = 1">
  148.             <xsl:attribute name="style">direction:RTL;font-size: 1.1em;font-family: tahoma;</xsl:attribute>
  149.         </xsl:if>
  150.         <xsl:if test="fr:status = 1">
  151.             <xsl:attribute name="class">entry read</xsl:attribute>
  152.         </xsl:if>
  153.                 
  154.         <div class="header">
  155.         <span class="title">
  156.         <xsl:choose>
  157.                 <xsl:when test="string-length(feed:link/@href)>0">
  158.               <a>
  159.             <xsl:attribute name="href"><xsl:value-of select="feed:link/@href"/></xsl:attribute>
  160.             <xsl:value-of select="feed:title"/>
  161.             </a>
  162.                 </xsl:when>
  163.                 <xsl:otherwise>
  164.             <xsl:value-of select="feed:title"/>
  165.                 </xsl:otherwise>
  166.                  </xsl:choose>
  167.         </span>
  168.  
  169.           <span class="status">
  170.           <xsl:attribute name="style">float:right;</xsl:attribute>
  171.           <xsl:if test="fr:rtlEnabled = 1">
  172.             <xsl:attribute name="style">float:left;</xsl:attribute>
  173.           </xsl:if>
  174.           <xsl:if test="fr:rtlEnabled != 1">
  175.             <xsl:attribute name="style">float:right;</xsl:attribute>
  176.           </xsl:if>
  177.           
  178.           <a>
  179.              
  180.           <xsl:attribute name="id">togglelink<xsl:value-of select="fr:item_id"/></xsl:attribute>
  181.             <xsl:attribute name="href">fr:toggleread/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  182.           <xsl:attribute name="onclick">this.blur();</xsl:attribute>
  183.                    
  184.           </a>
  185.           </span>
  186.         </div>
  187.     
  188.                 <div class="details">
  189.         <span>
  190.         <xsl:attribute name="id">star<xsl:value-of select="fr:item_id"/></xsl:attribute>
  191.         <xsl:if test="fr:flag = 1">
  192.             <xsl:attribute name="class">starred</xsl:attribute>
  193.         </xsl:if>
  194.         <xsl:if test="fr:flag != 1">
  195.             <xsl:attribute name="class">unstarred</xsl:attribute>
  196.         </xsl:if>
  197.         <xsl:attribute name="style">float:left;</xsl:attribute>
  198.           
  199.           <a>
  200.              
  201.           <xsl:attribute name="id">togglestar<xsl:value-of select="fr:item_id"/></xsl:attribute>
  202.             <xsl:attribute name="href">fr:togglestar/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  203.           <xsl:attribute name="onclick">this.blur();</xsl:attribute>
  204.                    
  205.           </a>
  206.         </span>
  207.  
  208. <span class="updated"><xsl:value-of select="fr:updated"/>, </span>        
  209.             <xsl:if test="feed:author"> 
  210.                   <span class="author">
  211.                 <xsl:apply-templates select="feed:author"/>
  212.                 </span>
  213.             </xsl:if>
  214.             <a>
  215.             <xsl:attribute name="href">fr:edittags/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  216.  
  217.             <img>
  218.             <xsl:attribute name="border">0</xsl:attribute>
  219.             <xsl:attribute name="hspace">5</xsl:attribute>
  220.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/tag_edit.png</xsl:attribute>
  221.             </img>
  222.             </a>
  223.                         
  224.             <xsl:if test="feed:category">
  225.                   <span class="category"> 
  226.                   <xsl:apply-templates select="feed:category"/>
  227.                 </span>
  228.                     </xsl:if>
  229.             <xsl:if test="feed:source">
  230.                   <span class="source"> 
  231.                 <a>
  232.                 <xsl:attribute name="href">fr:feed/<xsl:value-of select="feed:source/fr:feed_id"/></xsl:attribute>
  233.                 <xsl:value-of select="feed:source/feed:title"/>
  234.                 </a>
  235.                 <a>
  236.                 <xsl:attribute name="href">
  237.                 <!-- <xsl:for-each select = "feed:source/feed:link[@rel='alternate']"> --> 
  238.                     <xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/> 
  239.                     <!-- </xsl:for-each> -->
  240.                 </xsl:attribute>
  241.                       
  242.             <img>
  243.             <xsl:attribute name="border">0</xsl:attribute>
  244.             <xsl:attribute name="hspace">5</xsl:attribute>
  245.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/world_go.png</xsl:attribute>
  246.             </img>
  247.                 </a>                                  
  248.                 </span>
  249.                                 
  250.                     </xsl:if>
  251.         </div>
  252.  
  253.     <xsl:if test="feed:content">
  254.         <div class="content">
  255.             <xsl:value-of disable-output-escaping="yes" select="feed:content"/>
  256.         </div>
  257.     </xsl:if>
  258.     <div class="clear" />
  259.     </div>
  260.  
  261. </xsl:template>
  262.  
  263. <xsl:template match="feed:category">
  264.   <a>
  265.   <xsl:attribute name="href">fr:<xsl:value-of select="./@scheme"/></xsl:attribute>
  266.   <xsl:value-of select="./@term"/>
  267.   </a>, 
  268. </xsl:template>
  269.  
  270. <xsl:template match="feed:author">
  271.   <xsl:value-of select="feed:name"/>, 
  272. </xsl:template>
  273.  
  274. </xsl:stylesheet>
  275.